package com.weng.bigdata.core.warehouse.model.dto;

/**
 *  列模型
 * @author wengzhonghui
 * @date 15:23 2021/3/31
 */
public class ColumnDto implements Cloneable{

    /** 列名 */
    private String name;

    /** 字段类型*/
    private String jdbcType;

    /** 大小或数据长度 */
    private Integer size;

    /** 精度 */
    private Integer precision;

    /** 是否可空 */
    private Boolean isNullable = false;

    /** 默认值(可选) */
    private String defaultValue;

    /** 注释 */
    private String comment;

    /** 是否主键 */
    private Boolean isPk = false;

    /** 是否唯一 */
    private Boolean isUnique = false;

    /** jdbc类型 对应公认规范java.sql.Types */
    private Integer sqlTypesVal;

    public ColumnDto() {
    }

    public ColumnDto(String name, String jdbcType) {
        this.name = name;
        this.jdbcType = jdbcType;
    }

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getJdbcType() {
		return jdbcType;
	}

	public void setJdbcType(String jdbcType) {
		this.jdbcType = jdbcType;
	}

	public Integer getSize() {
		return size;
	}

	public void setSize(Integer size) {
		this.size = size;
	}

	public Integer getPrecision() {
		return precision;
	}

	public void setPrecision(Integer precision) {
		this.precision = precision;
	}

	public Boolean getNullable() {
		return isNullable;
	}

	public void setNullable(Boolean nullable) {
		isNullable = nullable;
	}

	public String getDefaultValue() {
		return defaultValue;
	}

	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public Boolean getPk() {
		return isPk;
	}

	public void setPk(Boolean pk) {
		isPk = pk;
	}

	public Boolean getUnique() {
		return isUnique;
	}

	public void setUnique(Boolean unique) {
		isUnique = unique;
	}

    public Integer getSqlTypesVal() {
        return sqlTypesVal;
    }

    public void setSqlTypesVal(Integer sqlTypesVal) {
        this.sqlTypesVal = sqlTypesVal;
    }
}
